package com.lhd.charging.device.controller;

import com.lhd.charging.pojo.StationInfoVO;
import com.lhd.charging.pojo.param.GunStatusUpdateParam;
import com.lhd.charging.web.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/device")
@Api(tags = "设备场站相关接口")
public class StationController {

    @ApiOperation("获取场站信息")
    @GetMapping("/station/info/{gunId}")
    public JsonResult creteOrder(@PathVariable("gunId")Integer gunId) {
        log.debug("获取场站信息{}",gunId);
        StationInfoVO stationInfoVO = new StationInfoVO();
        stationInfoVO.setStationId(1);
        stationInfoVO.setOperatorId(1);
        return JsonResult.ok(stationInfoVO);
    }

    @ApiOperation("更新枪状态信息")
    @PostMapping("/station/gun/status/update")
    public JsonResult updateGunStatus(@RequestBody GunStatusUpdateParam  gunStatusUpdateParam) {
        log.debug("更新枪状态信息{}",gunStatusUpdateParam);
        return JsonResult.ok(true);
    }
}
